/*
 * @Author: your name
 * @Date: 2021-08-26 20:04:38
 * @LastEditTime: 2021-08-27 10:31:45
 * @LastEditors: Please set LastEditors
 * @Description: In User Settings Edit
 * @FilePath: /backend/src/main/java/com/buaa/demo/Service/ServiceImplements/SubmissionServiceImpl.java
 */
package com.buaa.demo.Service.ServiceImplements;

import java.util.List;

import com.buaa.demo.Dao.SubmissionDao;
import com.buaa.demo.Entity.Submission;
import com.buaa.demo.Service.SubmissionService;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class SubmissionServiceImpl implements SubmissionService {

    @Autowired
    public SubmissionDao submissionDao;

    @Override
    public void submit(Submission sub) {
        submissionDao.submit(sub);
    }

    @Override
    public List<Integer> getUIds(int qn_id) { return submissionDao.getUIds(qn_id); }

    @Override
    public List<Submission> getSubmissions(int qn_id, int u_id) { return submissionDao.getSubmissions(qn_id, u_id); }

    @Override
    public List<Integer> getCIds(int qn_id, int u_id, int q_id) { return submissionDao.getCIds(qn_id, u_id, q_id); }
    
    @Override
    public String getAnswers(int qn_id, int u_id, int q_id) { return submissionDao.getAnswers(qn_id, u_id, q_id); }

    @Override
    public List<Integer> getQIds(int qn_id, int u_id) { return submissionDao.getQIds(qn_id, u_id); }
    
}
/*
 * @Author: your name
 * @Date: 2021-08-26 20:04:38
 * @LastEditTime: 2021-08-26 20:04:38
 * @LastEditors: Please set LastEditors
 * @Description: In User Settings Edit
 * @FilePath: /backend/src/main/java/com/buaa/demo/Service/ServiceImplements/SubmissionServiceImpl.java
 */
